function getContextPath() {
    let pathName = document.location.pathname;
    let index = pathName.substring(1).indexOf("/");
    let result = pathName.substring(0, index + 1);
    return result;
}